package com.study.service;

import com.study.util.LogUtil;

import java.lang.reflect.Method;

/**
 * @author: 李德才
 * @description:
 * @create: 2020-08-22 20:39
 **/
public class MyCalculator implements Calculator {
    @Override
    public Integer add(Integer i, Integer j) throws NoSuchMethodException {
//        Method add = MyCalculator.class.getMethod("add", Integer.class, Integer.class);
//        LogUtil.start(i, j);
//        LogUtil.start(  add,i, j);
        Integer i1 = i + j;
//        LogUtil.stop(i, j);
        return i1;
    }

    @Override
    public Integer sub(Integer i, Integer j) {
        return i - j;
    }

    @Override
    public Integer mul(Integer i, Integer j) {
        return i * j;
    }

    @Override
    public Integer div(Integer i, Integer j) {
        return i / j;
    }
}
